using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/****************************************************
// 功能：小兵显示层
// | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
// | Copyright (c) 2021-2025 聊来 All rights reserved.
// | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">聊来</a> )
// | @Author: 贯彻己道的云 <18970881148@qq.com>
// | DateTime: 2025/4/11 10:12:51
*****************************************************/

public class SoldierView : MainViewUnit
{
    public Soldier soldier;
    public override void Init(LogicUnit logicUnit) {
        base.Init(logicUnit);
        soldier = logicUnit as Soldier;
    }

    protected override void Update() {
        base.Update();

        if(soldier.unitState == UnitStateEnum.Dead) {
            DestroySoldier();
            RemoveItemInfo();
        }
    }

    private void DestroySoldier() {
        Destroy(gameObject, 3f);
    }
}
